//
//  EmitterAnimationViewController.m
//  AnimationDemo
//
//  Created by Jiaozl 2018 on 2018/9/14.
//  Copyright © 2018年 Jiaozl. All rights reserved.
//

#import "EmitterAnimationViewController.h"
#import "OtherEmitterAnimationViewController.h"

@interface EmitterAnimationViewController ()



@end




@implementation EmitterAnimationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

}


- (IBAction)emitterAnimationClick:(UIButton *)sender {
    switch (sender.tag/100) {
        case Rain:
        case Snow:
        case ColorBall:
        case LoveHeart:
        case Fire:
        case Fireworks:
            [self pushToOtherEmitterAnimationVCwithTitle:sender.titleLabel.text type:sender.tag/100];
            break;
        case QQLike:
            [self pushToVC:@"DianzanViewController" withTitle:sender.titleLabel.text];
            break;
        case RedPackage:
            [self pushToOtherEmitterAnimationVCwithTitle:sender.titleLabel.text type:sender.tag/100];
            break;
        default:
            
            break;
    }
}

- (void)pushToOtherEmitterAnimationVCwithTitle:(NSString *)title type:(EmitterAnimationType)type {
    
    OtherEmitterAnimationViewController *vc = [[OtherEmitterAnimationViewController alloc] init];
    
    vc.title = title;
    
    vc.emitterType = type;
    
    [self.navigationController pushViewController:vc animated:true];
    
}





@end
